export const rules = {
  name: [{
    required: true,
    message: "please enter name",
    trigger: "blur"
  }],
  currency: [{
    required: true,
    message: "please enter currency",
    trigger: "blur"
  }],
  crediterm_data: [{
    required: true,
    message: "please enter credit_term_type",
    trigger: "blur"
  }],
  crediterm: [{
    required: true,
    message: "please enter credit_term",
    trigger: "blur"
  }]
};

export function Model(
  crediterm = 1,
  group_id = null,
  crediterm_data = "day",
  currency = "sgd",
  name = "",
  salesman = "",
  mainbill_toaddress = "",
  mainbill_toattention = "",
  mainbill_totel = "",
  mainbill_tofax = "",
  mainship_toaddress = "",
  mainship_toattention = "",
  mainship_totel = "",
  mainship_tofax = "",
) {
  this.credit_term = credit_term;
  this.group_id = group_id;
  this.credit_term_type = credit_term_type;
  this.currency = currency;
  this.name = name;
  this.salesman = salesman;
  this.mainbill_toaddress = mainbill_toaddress;
  this.mainbill_toattention = mainbill_toattention;
  this.mainbill_totel = mainbill_totel;
  this.mainbill_tofax = mainbill_tofax;
  this.mainship_toaddress = mainship_toaddress;
  this.mainship_toattention = mainship_toattention;
  this.mainship_totel = mainship_totel;
  this.mainship_tofax = mainship_tofax;

}